#include "IRemoteAdapter.h"
#include "CZMotionRemoteAdapter.h"
#include "RemoteController/RemoteCompileConfig.h"

namespace RemoteUtility {
	namespace RemoteAdapter {
		IRemoteAdapter* IRemoteAdapter::createRemoteAdapter(IMessageShower* msgBox)
		{
#if defined(REMOTE_CONTROLLER) && (REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBMSREMOTE_)
			using RemoteUtility::RemoteAdapter::CZMotionRemoteAdapter;
			return new CZMotionRemoteAdapter(msgBox);
#endif
			// msid remote with trigger
#if defined(REMOTE_CONTROLLER) && (REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBMSREMOTE3_)
			using RemoteUtility::RemoteAdapter::CZMotionRemoteAdapter;
			return new CZMotionRemoteAdapter(msgBox);
#endif
			// use st remote
#if defined(REMOTE_CONTROLLER) && (REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBSTREMOTE_)
			using RemoteUtility::RemoteAdapter::CSTRemoteAdapter;
			return new CSTRemoteAdapter(msgBox);
#endif
			// use stix remote
#if defined(REMOTE_CONTROLLER) && (REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBSTIXREMOTE_ || REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBSNDOOREMOTE_)
			using RemoteUtility::RemoteAdapter::CStixRemoteAdapter;
			return new CStixRemoteAdapter(msgBox);
#endif
			// use cywee remote
#if defined(REMOTE_CONTROLLER) && (REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBCYWEEREMOTE_)
			using RemoteUtility::RemoteAdapter::CCyweeRemoteAdapter;
			return new CCyweeRemoteAdapter(msgBox);
#endif
			// use uei remote
#if defined(REMOTE_CONTROLLER) && (REMOTE_CONTROLLER == _TM_COMPILE_WITH_LIBFSRKREMOTE_)
			using RemoteUtility::RemoteAdapter::CFSRKRemoteAdapter;
			return new CFSRKRemoteAdapter(msgBox);
#endif
		}
	} // end namespace RemoteAdapter
} // end namespace RemoteUtility
